package com.csf.struct.proxy;

/**
 * TODO ADD DESCRIPTION
 * Date: 2018/9/6
 * Time: 16:14
 *
 * @author chenshf
 */
public class SourceProxy implements Sourceble {

    private Source source;

    public SourceProxy(){
        super();
        source = new Source();
    }
    @Override
    public void method1() {
        before();
        source.method1();
        after();
    }

    private void after() {
        System.out.println("after  ");
    }

    private void before() {
        System.out.println("before ");
    }
}
